package com.huaxindata.im.http;

import com.huaxin.common.tools.RequestHelper;
import com.huaxindata.common.http.HxRetrofit;

/**
 * Created by Administrator on 2017/9/19.
 */

public class RetrofitClient {
    private static HttpApi sHttpApi;

    /**
     * 这个是本来使用BaseLibrary库中的HxRetrofit.getInstance()方法来创建api
     * @return
     */
    public static HttpApi getHttpApi(String deprecated){
        if (sHttpApi == null) {
            return HxRetrofit.getInstance().create(HttpApi.class);
        }
        return sHttpApi;
    }
    public static HttpApi getHttpApi(){
        if (sHttpApi == null) {
            return RequestHelper.getRetrofit().create(HttpApi.class);
        }
        return sHttpApi;
    }
}
